package de.tud.binpacking.instance;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

public class Importer {

	public static List<Instance> importInstances(int nOrders, int capacity, String instancePath) throws FileNotFoundException, IOException {
		
		String instName = nOrders + "-" + capacity;

		instancePath = instancePath + File.separator + instName + "-SSHAPE";
		
		List<Instance> instances = new LinkedList<Instance>();
		
		String settingsPath = instancePath + File.separator + "settings.txt";
		
		for (int i = 0; i < 40; i++) {
			String path = instancePath + File.separator + instName + "-s-" + i + ".txt";
			
			instances.add(new Instance(path, settingsPath));
		}
		
		return instances;
	}
}
